<!DOCTYPE html>
<html>
<head>
    <title>
    </title>
    <link href="/layui/css/layui.css" media="all" rel="stylesheet">
    </link>
</head>
<body>
        <script src="/layui/layui.js"></script>
<div class="layui-tab" lay-filter="demo">
  <ul class="layui-tab-title layui-tab-card">
    <li value="{{route('bar-stocks.create')}}">吧台存货明细表</li>
    <li value="{{route('fruits-sanck.create')}}">水果小食存货明细表</li>
  </ul>
</div>
</body>
</html>
<script>
    //注意：选项卡 依赖 element 模块，否则无法进行功能性操作
    layui.use(['element', 'layer'], function () {
        var element = layui.element;
        var layer = layui.layer;
          //一些事件监听
          element.on('tab(demo)', function(data){
            //console.log($(this).attr('value'));
            var url = $(this).attr('value');
            window.location = url;
          });
    });
</script>
